public class Duck extends Animal implements ICanFly,ICanRun,ICanSwim{
    public Duck(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(this.name+"正在吃玉米");
    }

    @Override
    public void fly() {
        System.out.println(this.name+" is flying");
    }

    @Override
    public void run() {
        System.out.println(this.name+" is running");
    }

    @Override
    public void swim() {

    }
}
